PLEASE NOTE THAT THIS IS A BETA RELEASE OF THE MFACTORY OBJECT MODEL. WE ARE STILL MAKING SUBSTANTIAL MODIFICATIONS TO BOTH THE MOM SOFTWARE DEVELOPMENT KIT (SDK) AND THE ACCOMPANYING DOCUMENTATION.
The mFactory Object Model is a mechanism by which users can programmatically extend the functionality of mTropolis, using a language such as C or C++. With MOM, components can be built that seamlessly integrate with the mTropolis environment, from the underlying architecture to the visual interface.
Modifiers are one example of components that can be built with MOM. These components are organized into "kits", and dropped into mTropolis' "Resource" folder. When mTropolis is launched, each kit shows up in its own palette.
Before investigating MOM, it is recommended that you are at least somewhat familiar with mTropolis.
The enclosed MOM examples were built with version 5.5 of the Metrowerks CodeWarrior development environment. If you don't have access to CodeWarrior, you can still view the source code in any text editor, and also run the mTropolis projects that demonstrate the MOM examples.
For information about MOM on Windows platforms, please consult the "ABOUTMOM.WRI" file in the "MOMSDK" directory on the Windows partition of this mTropolis CD-ROM.
----------
The mFactory Object Model Examples folder contains the following items:
• "About MOM Examples" — this file;
• "Kits" — the examples in their binary (final) form, ready to be copied to mTropolis's "Resource" folder;
• "mTropolis Projects" — a group of mTropolis projects that demonstrate each example MOM modifier in the kit; and
• "Source" — the source code and CodeWarrior projects for each example.
A MOM User's Guide is located in Appendix B of the mTropolis Reference Guide, which is provided in Acrobat PDF format (found in the Documentation folder of the mTropolis sampler CD-ROM).
----------
There are six example MOM modifiers included with this beta release. Briefly, they are as follows:
• "Beep Example" — shows the basics of a component, such as receiving messages and attribute support;
• "Draw Bits Example" — shows how components can override core functionality, such as drawing;
• "Simple Messenger Example" — shows how components send messages to the mTropolis environment;
• "Interface Example" — shows how to construct dialogs for MOM components (buttons, etc.);
• "Momentum Example" — works in conjunction with the "Gravity Service Example" (see below); and
• "Gravity Service Example" — shows how components can act as services for other components.
Note that these example modifiers are provided solely to illustrate how to build MOM components. They are entirely unsupported, and should be used only for learning purposes. Files pertaining to these examples are organized as follows:
The Kits folder contains the following files: "DemoKit.ePP" (to be used with the PowerPC version of mTropolis) and "DemoKit.e68" (for the 680x0 version of mTropolis). To use these kits with mTropolis, drag the appropriate one to mTropolis' "Resource" folder prior to launching mTropolis.
The mTropolis Projects folder contains a group of very simple projects that demonstrate each example MOM modifier. Each example MOM modifier has a corresponding mTropolis project in this folder, with the exception of the "Gravity" mTropolis project, which demonstrates both the "Momentum" and "Gravity" example modifiers (since they work in conjunction with each other).
To open and run these projects, make sure you have copied the appropriate kit to mTropolis's "Resource" folder prior to launching mTropolis (see the description for the "Kits" folder, above).
The Source folder contains the source code and CodeWarrior projects for each example, in both PowerPC and 680x0 forms. They are organized as follows:
• "(PPC)" — contains the PowerPC CodeWarrior project, ".exp" file, and resource file;
• "Beep" — contains the Beep Example source code, plus its 680x0 CodeWarrior project;
• "DrawBits" — contains the Draw Bits Example source code, plus its 680x0 CodeWarrior project;
• "SimpMsgr" — contains the Simple Messenger Example source code, plus its 680x0 CodeWarrior project;
• "Interfac" — contains the Interface Example source code, plus its 680x0 CodeWarrior project;
• "Momentum" — contains the Momentum Example source code, plus its 680x0 CodeWarrior project; and
• "Gravity" — contains the Gravity Service Example source code, plus its 680x0 CodeWarrior project.
The source code for these MOM examples is provided for viewing only. Since this product sampler does not include the mFactory Object Model headers and libraries, these examples cannot be compiled.
Because of limitations in the CodeWarrior environment, the 680x0 versions of the CodeWarrior projects are organized differently from the PowerPC version. On the PowerPC side, all six examples are encapsulated in a single CodeWarrior project. On the 680x0 side, each example requires its own CodeWarrior project. See below for details:
The (PPC) folder contains the following files: "DemoKit.ePP.µ" (the PowerPC CodeWarrior project), "DemoKit.ePP.µ.exp" (the PowerPC CodeWarrior project's associated ".exp file"), and "DemoKit.ePP.rsrc" (the PowerPC copy of the kit's resource file).
The Beep folder contains the following files: "Beep.c" (the Beep Example's ".c" file), "Beep.h" (its ".h" file), and "Beep.µ" (its 680x0 CodeWarrior project).
Each of the five remaining folders (DrawBits, SimpMsgr, Interfac, Momentum, and Gravity) is organized in exactly the same way as the "Beep" folder.
The resources for the 680x0 versions of the modifiers reside within the "DemoKit.e68" kit in the "Kits" folder. The reason why there is no 680x0 equivalent of the "DemoKit.ePP.rsrc" file is because of a limitation in the CodeWarrior environment: multiple 680x0 CodeWarrior projects that each build a code resource destined for the same single file require that that file already exists. In this case, we have multiple 680x0 CodeWarrior projects that each compile a code resource into the "DemoKit.e68" kit. This file must already exist, and thus it's the most convenient place to store the 680x0 resources required by the example MOM modifiers.